package cn.edu.cqvie.jdk8.stream;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.List;

public class StreamTest10 {


    public static void main(String[] args) {
        List<String> list = Arrays.asList("hello", "world", "hello world");

        list.stream()
            .mapToInt(item -> {
                int len = item.length();
                System.out.println(item);
                return len;
            })
            .filter(item -> item == 5)
            .findFirst()
            .ifPresent(System.out::println);
    }
}
